package cn.student.service.impl;

import cn.student.dao.RegisterDaoMapper;
import cn.student.pojo.Register;
import cn.student.service.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 毛苏宇
 * User: me
 * Date: 2020/6/26
 * Time: 11:28
 * Description:
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class RegisterServiceImpl implements RegisterService {

    @Autowired
    private RegisterDaoMapper registerDaoMapper;

    @Override
    public boolean add(Register register) {
        return registerDaoMapper.insert(register) > 0 ? true : false;
    }
}
